package com.we823.project.repository.service.we;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.we823.project.model.we.RoleResourceModel;
import com.we823.project.repository.dao.we.RoleResourceRepository;
import com.we823.project.repository.service.AbstractBaseService;

@Service("roleResourceService")
@Scope("prototype")
public class RoleResourceService extends AbstractBaseService<RoleResourceModel> {

	private RoleResourceRepository roleResourceRepository;
	
	@Autowired
	public RoleResourceService(RoleResourceRepository roleResourceRepository) {
		super(roleResourceRepository);
		this.roleResourceRepository=roleResourceRepository;
	}

	public List<RoleResourceModel> findByRoleIdIn(List<Integer> roleIds) {
		return roleResourceRepository.findByRoleIdIn(roleIds);
	}

	public RoleResourceModel findByRoleId(int roleId) {
		return roleResourceRepository.findByRoleId(roleId);
	}
}
